package com.ruoyi.socket.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.socket.mapper.TbAnswerMapper;
import com.ruoyi.socket.domain.TbAnswer;
import com.ruoyi.socket.service.ITbAnswerService;

/**
 * 自动问答Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-05
 */
@Service
public class TbAnswerServiceImpl implements ITbAnswerService 
{
    @Autowired
    private TbAnswerMapper tbAnswerMapper;

    /**
     * 查询自动问答
     * 
     * @param answerId 自动问答主键
     * @return 自动问答
     */
    @Override
    public TbAnswer selectTbAnswerByAnswerId(Long answerId)
    {
        return tbAnswerMapper.selectTbAnswerByAnswerId(answerId);
    }

    /**
     * 查询自动问答列表
     * 
     * @param tbAnswer 自动问答
     * @return 自动问答
     */
    @Override
    public List<TbAnswer> selectTbAnswerList(TbAnswer tbAnswer)
    {
        return tbAnswerMapper.selectTbAnswerList(tbAnswer);
    }

    /**
     * 新增自动问答
     * 
     * @param tbAnswer 自动问答
     * @return 结果
     */
    @Override
    public int insertTbAnswer(TbAnswer tbAnswer)
    {
        return tbAnswerMapper.insertTbAnswer(tbAnswer);
    }

    /**
     * 修改自动问答
     * 
     * @param tbAnswer 自动问答
     * @return 结果
     */
    @Override
    public int updateTbAnswer(TbAnswer tbAnswer)
    {
        return tbAnswerMapper.updateTbAnswer(tbAnswer);
    }

    /**
     * 批量删除自动问答
     * 
     * @param answerIds 需要删除的自动问答主键
     * @return 结果
     */
    @Override
    public int deleteTbAnswerByAnswerIds(Long[] answerIds)
    {
        return tbAnswerMapper.deleteTbAnswerByAnswerIds(answerIds);
    }

    /**
     * 删除自动问答信息
     * 
     * @param answerId 自动问答主键
     * @return 结果
     */
    @Override
    public int deleteTbAnswerByAnswerId(Long answerId)
    {
        return tbAnswerMapper.deleteTbAnswerByAnswerId(answerId);
    }
}
